package cn.git.agent.match;

import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.matcher.ElementMatcher;

/**
 * @description: IndirectMatch，所有非nameMatch情况，都需要实现IndirectMatch
 * @program: bank-credit-sy
 * @author: lixuchun
 * @create: 2024-12-24
 */
public interface IndirectMatch extends ClassMatch {

    /**
     * 构建匹配规则
     * eg: named(CLASS_NAME1).or(named(CLASS_NAME2))
     *
     * @return
     */
    ElementMatcher.Junction<? super TypeDescription> buildJunction();

    /**
     * 用于当前匹配器
     * 用于判断 typeDescription 是否满足 IndirectMatch 的实现
     *
     * @param typeDescription
     * @return
     */
    boolean isMatch(TypeDescription typeDescription);

}
